home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c++ / 95 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  2.2 KB

  1. From: Dick Menninger <Dick.Menninger@daytonoh.attgis.com>
  2. Message-ID: <DLLI04.4A0@falcon.daytonoh.attgis.com>
  3. X-Original-Date: Mon, 22 Jan 1996 18:28:52 GMT
  4. Path: in1.uu.net!bounce-back
  5. Date: 22 Jan 96 22:07:17 GMT
  6. Approved: fjh@cs.mu.oz.au
  7. Return-Path: <daemon@meeker.UCAR.EDU>
  8. Newsgroups: comp.std.c++
  9. Subject: Re: Throwing an exception from within a si
  10. Reply-To: mennid <Dick.Menninger@daytonoh.attgis.com>
  11. Organization: AT&T Global Information Solutions
  12. X-Newsreader: DiscussIT 2.5.1.3 for MS Windows [AT&T Software Products Division]
  13. References: <4dok0e$5i7@galaxy.ucr.edu>
  14. X-Auth: PGPMoose V1.1 PGP comp.std.c++
  15.     iQBFAgUBMQQKquEDnX0m9pzZAQG+QQGAnuwswpkrBo5XVLHlgGrfMkUgOwRVXIPB
  16.     fDlUdTmbnr/FGWTobNl44QzZy9/F9kJU
  17.     =6W4u
  18.  
  19. > ==========Tom Payne, 1/19/96==========
  20. > Dick Menninger (Dick.Menninger@daytonoh.attgis.com) wrote:
  21.  
  22. > Good analysis, but I'm unclear about the conclusion.  Functions called
  23. > by signal handlers should be allowed to throw exceptions.  If,
  24. > however, the signal handler itself throws an exception or fails to
  25. > catch one thrown to it, then the situation seems analogous to the base
  26. > function of a thread throwing an exception or failing to catch one
  27. > thrown to it.  Shouldn't we consider that a bug?
  28.  
  29. If a thread in a multi-threaded environment throws an
  30. uncaught exception, something must happen.  That
  31. something also applies to the signal handler's uncaught
  32. exceptions unless another, more specific mechanism
  33. is supplied.  For instance, since a C++ wrapper to the
  34. signal handler is needed to determine this has happened,
  35. the wrapper could have a standard default action function
  36. that can be overridden by the app.  The language has
  37. set the precedent of defining how uncaught exceptions
  38. behave is some circumstances.  Once that door is open,
  39. the language has to do it in the rest of them.
  40.  
  41. The above should also work in single-threaded environments,
  42. as well.  It is just more obvious when thinking in terms
  43. of multi-threaded environments.
  44.  
  45.  
  46. Good Day
  47. Dick
  48. Dick.Menninger@DaytonOH.ATTGIS.COM
  49. ---
  50. [ comp.std.c++ is moderated.  Submission address: std-c++@ncar.ucar.edu.
  51.   Contact address: std-c++-request@ncar.ucar.edu.  The moderation policy
  52.   is summarized in http://dogbert.lbl.gov/~matt/std-c++/policy.html. ]
  53.